feat: replace Preferences window with SwiftUI#231
Merged
Conversation
2ndalpha
added a commit
that referenced
this pull request
Feb 28, 2026
Migrate the Preferences window from ObjC PreferenceController + XIB to SwiftUI, following the same pattern established in PR #227 (URLSheet). New SwiftUI implementation: - PreferencesView with TabView (toolbar style) containing all 5 tabs - RemoteIntervalMapper for slider position <-> interval mapping - ShortcutRecorderView (NSViewRepresentable) wrapping SRRecorderControl - SparkleObserver wrapping SUUpdater as ObservableObject - LoginItemObserver wrapping the existing ObjC LoginItem class - PreferencesPresenter (@objc bridge) for ApplicationController - SF Symbol tab icons (gearshape, square.and.pencil, globe, command.square.fill, arrow.triangle.2.circlepath) Deleted: - Preferences.xib, PreferenceController.h/.m, UpdateDateTransformer.h/.m - Unused preference tab icon PNGs (Editor, Hotkeys, Remote, Update)
d93c326 to
fc0085a
Compare
2ndalpha
added a commit
that referenced
this pull request
Feb 28, 2026
Migrate the Preferences window from ObjC PreferenceController + XIB to SwiftUI, following the same pattern established in PR #227 (URLSheet). New SwiftUI implementation: - NSTabViewController with tabStyle = .toolbar for proper preference toolbar icons (SF Symbols: gearshape, square.and.pencil, globe, command.square.fill, arrow.triangle.2.circlepath) - Individual SwiftUI tab views wrapped in NSHostingController - RemoteIntervalMapper for slider position <-> interval mapping - ShortcutRecorderView (NSViewRepresentable) wrapping SRRecorderControl - SparkleObserver wrapping SUUpdater as ObservableObject - LoginItemObserver wrapping the existing ObjC LoginItem class - PreferencesPresenter (@objc bridge) for ApplicationController Deleted: - Preferences.xib, PreferenceController.h/.m, UpdateDateTransformer.h/.m - Unused preference tab icon PNGs (Editor, Hotkeys, Remote, Update)
fc0085a to
237f18f
Compare
2ndalpha
added a commit
that referenced
this pull request
Feb 28, 2026
Migrate the Preferences window from ObjC PreferenceController + XIB to SwiftUI, following the same pattern established in PR #227 (URLSheet). New SwiftUI implementation: - NSTabViewController with tabStyle = .toolbar and toolbarStyle = .preference for proper macOS preference toolbar with SF Symbol icons - Individual SwiftUI tab views wrapped in NSHostingController - RemoteIntervalMapper for slider position <-> interval mapping - ShortcutRecorderView (NSViewRepresentable) wrapping SRRecorderControl - SparkleObserver wrapping SUUpdater as ObservableObject - LoginItemObserver wrapping the existing ObjC LoginItem class - PreferencesPresenter (@objc bridge) for ApplicationController Deleted: - Preferences.xib, PreferenceController.h/.m, UpdateDateTransformer.h/.m - Unused preference tab icon PNGs (Editor, Hotkeys, Remote, Update)
237f18f to
f524bfa
Compare
2ndalpha
added a commit
that referenced
this pull request
Feb 28, 2026
Migrate the Preferences window from ObjC PreferenceController + XIB to SwiftUI, following the same pattern established in PR #227 (URLSheet). New SwiftUI implementation: - NSTabViewController with tabStyle = .toolbar and toolbarStyle = .preference for proper macOS preference toolbar with SF Symbol icons - Fixed content size across all tabs to prevent window resizing on tab switch - Individual SwiftUI tab views wrapped in NSHostingController - RemoteIntervalMapper for slider position <-> interval mapping - ShortcutRecorderView (NSViewRepresentable) wrapping SRRecorderControl - SparkleObserver wrapping SUUpdater as ObservableObject - LoginItemObserver wrapping the existing ObjC LoginItem class - PreferencesPresenter (@objc bridge) for ApplicationController Deleted: - Preferences.xib, PreferenceController.h/.m, UpdateDateTransformer.h/.m - Unused preference tab icon PNGs (Editor, Hotkeys, Remote, Update)
f524bfa to
e0a8184
Compare
2ndalpha
added a commit
that referenced
this pull request
Feb 28, 2026
Migrate the Preferences window from ObjC/XIB to SwiftUI, following the same pattern used for URLSheet in PR #227. - Replace PreferenceController (ObjC) + Preferences.xib with a SwiftUI-based presenter using NSTabViewController for proper macOS toolbar-style tab icons - Add 5 SwiftUI tab views: General, Editor, Remote, Hotkeys, Update - Use SF Symbols for tab icons (gearshape, square.and.pencil, globe, command.square.fill, arrow.triangle.2.circlepath) - Bridge ShortcutRecorder via NSViewRepresentable for hotkey recording - Wrap SUUpdater and LoginItem in ObservableObject for SwiftUI binding - Add RemoteIntervalMapper for clean slider-to-minutes conversion - Remove unused preference icon PNGs and old ObjC files - Add PreferencesPresenter tests (window creation, reuse, tabs, icons) - Uniform tab content size prevents window resizing on tab switch
e0a8184 to
1689fae
Compare
Migrate the Preferences window from ObjC/XIB to SwiftUI, following the same pattern used for URLSheet in PR #227. - Replace PreferenceController (ObjC) + Preferences.xib with a SwiftUI-based presenter using NSTabViewController for proper macOS toolbar-style tab icons - Add 5 SwiftUI tab views: General, Editor, Remote, Hotkeys, Update - Use SF Symbols for tab icons (gearshape, square.and.pencil, globe, command.square.fill, arrow.triangle.2.circlepath) - Bridge ShortcutRecorder via NSViewRepresentable for hotkey recording - Wrap SUUpdater and LoginItem in ObservableObject for SwiftUI binding - Add RemoteIntervalMapper for clean slider-to-minutes conversion - Remove unused preference icon PNGs and old ObjC files - Add PreferencesPresenter tests (window creation, reuse, tabs, icons) - Uniform tab content size prevents window resizing on tab switch
- Use Sparkle public API for reading automaticChecksEnabled instead of hardcoding the UserDefaults key - Guard screenshot test against headless CI with XCTSkipIf and remove NSScreen.main force unwrap
101c530 to
47f3b7b
Compare
The rebase onto master picked up menuIcon.tiff references that were deleted by #232 (app icon migration to asset catalog). Remove the orphaned PBXBuildFile, PBXFileReference, and Resources build phase entries for menuIcon.tiff and menuIcon@2x.tiff.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PreferenceController+Preferences.xibto SwiftUI, following the pattern from feat: replace URLSheet with SwiftUI #227 (URLSheet)NSTabViewControllerwithtabStyle = .toolbarandtoolbarStyle = .preferencefor proper macOS preference toolbar with SF Symbol iconsNSHostingController: General, Editor, Remote, Hotkeys, UpdateSRRecorderControl(ShortcutRecorder) andSUUpdater(Sparkle) for SwiftUI viaNSViewRepresentableandObservableObjectPreferences.xib,PreferenceController.h/.m,UpdateDateTransformer.h/.m, and unused preference tab icon PNGs (−685 lines)Screenshot
New files
PreferencesView.swiftPreferencesPresenter.swift@objcbridge withNSTabViewControllersetupRemoteIntervalMapper.swiftShortcutRecorderView.swiftNSViewRepresentablewrappingRecorderControlSparkleObserver.swiftObservableObjectwrappingSUUpdater.shared()LoginItemObserver.swiftObservableObjectwrapping ObjCLoginItemTab icons (SF Symbols)
gearshapesquare.and.pencilglobecommand.square.fillarrow.triangle.2.circlepathTest plan